using System;
using System.Collections.Generic;
using System.Text;
using NHibernate;
using DATA.BusinessObjects;
using DATA.Base;

namespace DATA.ManagerObjects
{
    public partial interface IChitietdoanhthutheoloaiphongManager : IManagerBase<DATA.BusinessObjects.Chitietdoanhthutheoloaiphong, string>
    {
		// Get Methods
		IList<Chitietdoanhthutheoloaiphong> GetByMaDoanhThuTheoLoaiPhong(System.String doanhthutheoloaiphong);
		IList<Chitietdoanhthutheoloaiphong> GetByMaLoaiPhong(System.String loaiphong);
    }

    partial class ChitietdoanhthutheoloaiphongManager : ManagerBase<DATA.BusinessObjects.Chitietdoanhthutheoloaiphong, string>, IChitietdoanhthutheoloaiphongManager
    {
		#region Constructors
		
		public ChitietdoanhthutheoloaiphongManager() : base()
        {
        }
        public ChitietdoanhthutheoloaiphongManager(INHibernateSession session) : base(session)
        {
        }
		
		#endregion
		
        #region Get Methods

		
		public IList<Chitietdoanhthutheoloaiphong> GetByMaDoanhThuTheoLoaiPhong(System.String doanhthutheoloaiphong)
        {
            ICriteria criteria = Session.GetISession().CreateCriteria(typeof(Chitietdoanhthutheoloaiphong));
			
			
			ICriteria doanhthutheoloaiphongCriteria = criteria.CreateCriteria("Doanhthutheoloaiphong");
            doanhthutheoloaiphongCriteria.Add(NHibernate.Criterion.Expression.Eq("Id", doanhthutheoloaiphong));
			
			return criteria.List<Chitietdoanhthutheoloaiphong>();
        }
		
		public IList<Chitietdoanhthutheoloaiphong> GetByMaLoaiPhong(System.String loaiphong)
        {
            ICriteria criteria = Session.GetISession().CreateCriteria(typeof(Chitietdoanhthutheoloaiphong));
			
			
			ICriteria loaiphongCriteria = criteria.CreateCriteria("Loaiphong");
            loaiphongCriteria.Add(NHibernate.Criterion.Expression.Eq("Id", loaiphong));
			
			return criteria.List<Chitietdoanhthutheoloaiphong>();
        }
		
		#endregion
    }
}